package com.study.teacher;

import java.util.*;

public class CompositeShape extends IShape{
	ArrayList<IShape> list = new ArrayList<IShape>();
	
	public CompositeShape(IDrawing drawing){
		super(drawing);
	}
	
	public void draw(){
		System.out.print("Composite Shape:");		
		for(int i = 0;i<list.size();i++ ){
			list.get(i).draw();
		}
	}
	
	public void addShape(IShape shape){
		list.add(shape);
	}
	
	public void removeShape(IShape shape){
		list.remove(shape);
	}
}
